package lib.paxos;

import lib.Command;

/**
 * Interface for the Paxos functionality
 * @author abhip
 *
 */
public interface IPaxosFunctionality
{
    /**
     * Gets the result of execution of the chosen command
     * @return
     */
    Object GetResult();

    /**
     * Tries to run Paxos to get consensus from majority,
     * that proposed command should be chosen for the given round
     * @param roundID Paxos round to run
     * @param command Proposed command
     * @return true if successful
     */
    boolean RunPaxos(int roundID, Command command);
}
